﻿Public Partial Class UploadQ88
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    'Private Sub AsyncFileUploadQ88_UploadedComplete(ByVal sender As Object, ByVal e As AjaxControlToolkit.AsyncFileUploadEventArgs) Handles AsyncFileUploadQ88.UploadedComplete
    '    Try
    '        Dim filename As String = System.IO.Path.GetFileName(AsyncFileUploadQ88.FileName) 'ชื่อไฟล์
    '        Dim Type As String = System.IO.Path.GetExtension(AsyncFileUploadQ88.FileName)   'นามสกุล
    '        Dim ContentType As String = AsyncFileUploadQ88.PostedFile.ContentType
    '        Dim nameGuid As String = Guid.NewGuid().ToString()
    '        'If (AsyncFileUpload1.PostedFile.ContentLength > 1024000) Then  'ไม่เกิน 1M

    '        'End If
    '        AsyncFileUploadQ88.SaveAs(Server.MapPath("../Uploads/") + nameGuid)
    '        Dim dt As DataTable = Session("Q88")
    '        ' Dim dt As DataTable = CreateFileDataTable()
    '        If (dt.Rows.Count = 0) Then
    '            Dim dr As DataRow = dt.NewRow()
    '            dr.Item("File_nameGuid") = nameGuid
    '            dr.Item("File_name") = filename
    '            dr.Item("File_Type") = Type
    '            dr.Item("File_ContentType") = ContentType
    '            dt.Rows.Add(dr)
    '        Else
    '            dt.Rows(0).Item("File_nameGuid") = nameGuid
    '            dt.Rows(0).Item("File_name") = filename
    '            dt.Rows(0).Item("File_Type") = Type
    '            dt.Rows(0).Item("File_ContentType") = ContentType
    '        End If
    '        dt.AcceptChanges()
    '        Session("Q88") = dt
    '        'ScriptManager.RegisterClientScriptBlock(Me.Page, GetType(String), "myscript", " call88();", True)
    '    Catch ex As Exception

    '    End Try


    'End Sub

    'Public Function CreateFileDataTable() As DataTable
    '    Dim dt As New DataTable
    '    dt.Columns.Add("File_nameGuid", GetType(String))
    '    dt.Columns.Add("File_name", GetType(String))
    '    dt.Columns.Add("File_Type", GetType(String))
    '    dt.Columns.Add("File_ContentType", GetType(String))
    '    dt.AcceptChanges()
    '    Return dt
    'End Function

    'Private Sub btnHide_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnHide.Click
    '    gridfile.DataSource = Session("Q88")
    '    gridfile.DataBind()
    '    'ScriptManager.RegisterClientScriptBlock(Me.Page, GetType(String), "myscript", " parent.callQ88();", True)
    'End Sub
End Class